//
//  MJCollectionViewController.swift
//  SwiftDemo
//
//  Created by s on 2019/5/16.
//  Copyright © 2019 s. All rights reserved.
//

import UIKit
import MJRefresh

class MJCollectionViewController: UIViewController {

    @IBOutlet weak var collection: UICollectionView!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        collection.mj_header = MJRefreshNormalHeader.init(refreshingBlock: {
            print("\(self.collection.mj_header.isRefreshing)")
            Timer.scheduledTimer(withTimeInterval: 2, repeats: false, block: { (timer) in
                self.collection.mj_header.endRefreshing()
            })
        })
    }
    


}
